import request from '@/utils/request'

// 查询定时任务调度列表
export function listArticle(query) {
  return request({
    url: '/base/article/list',
    method: 'get',
    params: query
  })
}

// 查询定时任务调度详细
export function getArticle(jobId) {
  return request({
    url: '/base/article/' + jobId,
    method: 'get'
  })
}

export function getCompanyInfo(jobId) {
  return request({
    url: '/base/company/' + jobId,
    method: 'get'
  })
}

export function updateCompanyInfo(data) {
  return request({
    url: '/base/company',
    method: 'put',
    data: data
  })
}

// 新增定时任务调度
export function addArticle(data) {
  return request({
    url: '/base/article',
    method: 'post',
    data: data
  })
}

// 修改定时任务调度
export function updateArticle(data) {
  return request({
    url: '/base/article',
    method: 'put',
    data: data
  })
}

// 删除定时任务调度
export function delArticle(jobId) {
  return request({
    url: '/base/article/' + jobId,
    method: 'delete'
  })
}
